(xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s,
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 4 Aug 2007 09:48:27 +0000 (09:48 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 4 Aug 2007 09:48:27 +0000 (09:48 +0000)
add comment explaining why.

src/gtkutil.c

index f52e68b1230e5770ec9c510b7865c918459e143c..29aafc013e9ce18b285414ac2b4c25533870f725 100644 (file)
@@ -3372,8 +3372,16 @@ xg_tool_bar_callback (w, client_data)
 
   key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY);
   XSETFRAME (frame, f);
+
+  /* We generate two events here.  The first one is to set the prefix
+     to `(tool_bar)', see keyboard.c.  */
   event.kind = TOOL_BAR_EVENT;
   event.frame_or_window = frame;
+  event.arg = frame;    
+  kbd_buffer_store_event (&event);      
+  
+  event.kind = TOOL_BAR_EVENT;          
+  event.frame_or_window = frame;
   event.arg = key;
   /* Convert between the modifier bits GDK uses and the modifier bits
      Emacs uses.  This assumes GDK an X masks are the same, which they are when